package com.example.app.dto;

import java.util.List;

public class FoodRecognitionResult {
    private Long logId;
    private Integer resultNum;
    private List<ResultItem> result; // 确保字段名为 result
    private Location location;

    // Getters and Setters
    public Long getLogId() {
        return logId;
    }

    public void setLogId(Long logId) {
        this.logId = logId;
    }

    public Integer getResultNum() {
        return resultNum;
    }

    public void setResultNum(Integer resultNum) {
        this.resultNum = resultNum;
    }

    // 确保方法名是 setResult
    public List<ResultItem> getResult() {
        return result;
    }

    // 这里是关键！确保方法名是 setResult
    public void setResult(List<ResultItem> result) {
        this.result = result;
    }

    public Location getLocation() {
        return location;
    }

    public void setLocation(Location location) {
        this.location = location;
    }

    // ResultItem 内部类
    public static class ResultItem {
        private String name;
        private Double probability;
        private String calorie;
        private Boolean hasCalorie;
        private Double calorieNum;
        private BaikeInfo baikeInfo;
        private Location location;

        // Getters and Setters
        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public Double getProbability() {
            return probability;
        }

        public void setProbability(Double probability) {
            this.probability = probability;
        }

        public String getCalorie() {
            return calorie;
        }

        public void setCalorie(String calorie) {
            this.calorie = calorie;
        }

        public Boolean getHasCalorie() {
            return hasCalorie;
        }

        public void setHasCalorie(Boolean hasCalorie) {
            this.hasCalorie = hasCalorie;
        }

        public Double getCalorieNum() {
            return calorieNum;
        }

        public void setCalorieNum(Double calorieNum) {
            this.calorieNum = calorieNum;
        }

        public BaikeInfo getBaikeInfo() {
            return baikeInfo;
        }

        public void setBaikeInfo(BaikeInfo baikeInfo) {
            this.baikeInfo = baikeInfo;
        }

        public Location getLocation() {
            return location;
        }

        public void setLocation(Location location) {
            this.location = location;
        }
    }

    // Location 内部类
    public static class Location {
        private Integer top;
        private Integer left;
        private Integer width;
        private Integer height;

        // Getters and Setters
        public Integer getTop() {
            return top;
        }

        public void setTop(Integer top) {
            this.top = top;
        }

        public Integer getLeft() {
            return left;
        }

        public void setLeft(Integer left) {
            this.left = left;
        }

        public Integer getWidth() {
            return width;
        }

        public void setWidth(Integer width) {
            this.width = width;
        }

        public Integer getHeight() {
            return height;
        }

        public void setHeight(Integer height) {
            this.height = height;
        }
    }

    // BaikeInfo 内部类
    public static class BaikeInfo {
        private String baikeUrl;
        private String imageUrl;
        private String description;

        // Getters and Setters
        public String getBaikeUrl() {
            return baikeUrl;
        }

        public void setBaikeUrl(String baikeUrl) {
            this.baikeUrl = baikeUrl;
        }

        public String getImageUrl() {
            return imageUrl;
        }

        public void setImageUrl(String imageUrl) {
            this.imageUrl = imageUrl;
        }

        public String getDescription() {
            return description;
        }

        public void setDescription(String description) {
            this.description = description;
        }
    }
}